home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.3 KB | 55 lines | [TEXT/GEOL] |
- Item 8327353 20-Feb-91 06:51
-
- From: MIKE.BLACKWELL@ROVER.RI.CMU.EDU@INTERNET#
-
- To: MACAPP.TECH$ MacApp Technical
-
- INTERNET# Document Id: <667079498/mkb@ROVER.RI.CMU.EDU>
-
- ------------------------------------------------------------------------------
-
- Sub: Serial handlers
-
- If you use AppleLink 6.0, you win! The Reply button works for gatewayed E-mail.
- Otherwise, copy & paste this: Mike.Blackwell@ROVER.RI.CMU.EDU@INTERNET#
-
- From: Mike.Blackwell@ROVER.RI.CMU.EDU
- To: macapp.tech$@applelink.apple.com
-
- A few weeks ago I asked if anyone had any objects that would help
- interface a MacApp application with the serial ports. While noone did
- (or would admit to it), several people asked me to pass on any info I
- received... I've gone ahead and wrote some code that solves my
- particular problem (a graphical controller for our mobile robot), and
- I'd like to pass it along to the community.
-
- I have the relevant objects packaged in to simple dumb terminal
- emulator to illustrate how they work. The three objects of concern are:
- TSerialHandler, which manages interactions to and from the serial
- drivers; TConsoleView, a subclass of TTranscriptView which implements a
- simple console window (and fixes a couple of annoying bugs in
- TTranscriptView - well, it does say to use at your own risk...); and
- TDisplayHandler, an idle time cohandler which polls the serial handler
- and ships incoming characters to the console view. Key downs from the
- console view are sent directly to the serial handler.
-
- Because the serial driver is polled, there is a possiblity of loosing
- some characters, depending on what other processing your application
- does and how big an input buffer you allocate. In my case, I can talk
- reliably at 9600 baud as long as the packet burst length is less than a
- few hundred bytes.
-
- This is all in C++, and uses Robert Lenoil's CPlusMacApp package.
-
- Since I am not directly on AppleLink, I'm not sure of the best method
- for sending this stuff out. I can Stuffit/Binhex it and email it
- directly to people, or maybe just to one person who can archive it. Let
- me know what would be best.
-
- Mike Blackwell mkb@rover.ri.cmu.edu
- Robotics Institute
- Carnegie Mellon University
- Pittsburgh, PA, 15213
-
- 412-268-8830
-